package cn.hwy.societies.controller;

import cn.hwy.societies.biz.IClubService;
import cn.hwy.societies.pojo.club.Club;
import cn.hwy.societies.web.Result;
import cn.hwy.societies.web.club.param.ClubCreateParam;
import cn.hwy.societies.web.club.result.ClubCreateResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ClubController {


    @Autowired
    private IClubService clubService;

//    ClubMapper clubMapper;
    /**
     * 1. 申请创建社团
     * @return
     */
    @PostMapping("/club/create")
    public Result<ClubCreateResult> clubCreate(@RequestBody ClubCreateParam clubParam) {
        Boolean result = clubService.add(clubParam);
        ClubCreateResult build = ClubCreateResult.builder().flag(result).build();
        return Result.success(build);
    }
//
//    public String test() {
//
//        return null;
//    }
//    public String test() {
//
//        return null;
//    }
//    public String test() {
//
//        return null;
//    }
//    public String test() {
//
//        return null;
//    }
//    public String test() {
//
//        return null;
//    }
//    public String test() {
//
//        return null;
//    }
}
